import Vue from 'vue'
// 将app.vue的代码导入进来
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false
// 直接在vue上写的方法就是全局方法
Vue.filter('fil', function(val) {
  var time = '';
  if(val) {
    var date = new Date(val)
    let year = date.getFullYear()
    let month = date.getMonth() + 1
    let day = date.getDate()
    let hour = date.getHours()
    let min = date.getMinutes()
    let sec = date.getSeconds()
    time = `${year}-${month}-${day} ${hour}:${min}:${sec}`
  }
  return time
})
new Vue({
  el: "#app",
  router,
  // render vue渲染页面的方法
  render: h => h(App)
})
// .$mount('#app') vue的挂在点
